<?php

namespace App\Http\Controllers\App\Pet;


use App\Repositories\Pet\PetGiftRepository;
use App\Response\Response;
use Illuminate\Http\Request;
use App\Http\Controllers\BaseController;

class PetGiftController extends BaseController
{

    public function getLogList(Request $request)
    {
        $models = PetGiftRepository::getInstance()->getLogList();
        return Response::sendData($models);
    }

    public function getUnUsedProps(Request $request)
    {
        $models = PetGiftRepository::getInstance()->getUnUsedProps();
        return Response::sendData($models);
    }


    public function getList(Request $request)
    {
        $params = [
            'page' => $request->input('page', 1),
            'perPage' => $request->input('perPage', 3),
        ];
        $models = PetGiftRepository::getInstance()->getGiftList($params);
        return Response::sendData($models);
    }

    public function exchange($config_id)
    {
        $res = PetGiftRepository::getInstance()->exchange($config_id);
        return Response::sendData($res);
    }

}